package com.jfinalbbs.module.caruser;

import java.util.List;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinalbbs.common.BaseModel;

public class Baoyang extends BaseModel<Baoyang> {
	public static final Baoyang me = new Baoyang();

	public Page<Baoyang> get4slist(Integer currentPage, Integer pagesize) {
		// TODO paginate
		Page<Baoyang> k = me.paginate(currentPage, pagesize, "SELECT *  ", "from jfbbs_baoyang ");
		return k;
	}

	public boolean add4s(String fbr, String creattime, String typeme, String content) {
		// TODO INSERT INTO baoyang (faburen,fabutime,type,content) VALUES(
		int k = Db.update("INSERT INTO jfbbs_baoyang (faburen,fabutime,type,content) VALUES(?,?,?,?)", fbr, creattime,
				typeme, content);
		return k > 0 ? true : false;

	}
}
